8B/10B encoding is a line code that maps 8-bit symbols to 10-bit symbols in order to maintain a direct-current (DC) balanced signal. The difference between the count of 1s and 0s in a string of at least 20 bits will be no more than 2 at any time under 8B/10B encoding. In addition, 8B/10B encoding does not allow for strings of over five 1s or 0s in a row. 8B/10B encoding achieves this DC balanced signal by maintaining a running disparity. The running disparity keeps track of whether more 1s or 0s are in the signal at any given time. If the running disparity indicates there are more 1s, the 8B/10B protocol calls for a data frame with more 0s to be sent. Conversely, if the running disparity indicates there are more 0s, the 8B/10B protocol calls for a data frame with more 1s to be sent.
Fibre Channel is a gigabit-speed data transmission protocol that can be applied in storage networking. Fibre Channel uses an 8B/10B encoding. For data transmission protocols such as Fibre Channel that require different end-of-frame code words to terminate a transmission frame based on the current running disparity, a solution is to compute the 8B/10B encoding of the output data early in the transmission pipeline when it is still possible to change the outgoing data. This precludes using built-in 8B/10B circuitry packaged with transceiver hard IP blocks available in most high-end field-programmable gate arrays (FPGAs) or licensed for “black box” use in application-specific integrated circuits (ASICs). Built-in 8B/10B encoders cannot support protocols such as Fibre Channel because they are attached too deep within the transmission pipeline to allow for control logic to switch the terminator when needed. In these cases, a separate 8B/10B block must be implemented, wasting circuitry already in place and incurring unnecessary additional expense from the extra logic gates.